<form action="" class="form-horizontal" role="form">

	<div class="form-group">
		<label class="col-sm-2 control-label">项目名称</label>
		<div class="col-sm-2">
			<input type="text" class="form-control" name="name" placeholder="请输入项目名称" datatype="*" value="{$item.name}" />
		</div>
	</div>

	<div class="form-group">
		<label class="col-sm-2 control-label">项目描述</label>
		<div class="col-sm-2">
			<input type="text" class="form-control" name="desc" placeholder="请输入项目描述" datatype="*" value="{$item.desc}" />
		</div>
	</div>

	<div class="form-group">
		<label class="col-sm-2 control-label">项目图片</label>
		<div class="col-sm-6">
			<input type="text" class="form-control margin-bottom" name="image" id="image" placeholder="请输入图片地址，或点击上传" value="{$item.image}">
			<span class="btn btn-primary" id="image_upload">上传图片</span>
		</div>
	</div>

	<div class="form-group">
		<div class="col-sm-offset-2 col-sm-8">
			<button type="submit" class="btn btn-primary submit" data-loading-txt="提交中，请稍后……" data-ajax-url="__CONTROLLER__/saveProject">保存更改</button>
		</div>
	</div>

</form>

<link rel="stylesheet" href="__PUBLIC__/Style/Common/uploadify/uploadify.css">
<script src="__PUBLIC__/Style/Common/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript">
	$(function() {
		$("#image_upload").uploadify({
			'multi': false,
			'buttonClass': 'margin-bottom',
			'fileSizeLimit': '200kb',
			'buttonText': '上传图片',
			'fileTypeDesc': 'Image Files',
			'fileTypeExts': '*.jpg; *.png',
			'swf': '__PUBLIC__/Style/Common/uploadify/uploadify.swf',
			'uploader': '__MODULE__/Upload/uploadOne',
			'onUploadStart': function() {},
			'onUploadSuccess': function(data, res) {
				var url = eval("(" + res + ")").extra.url;
				$("#image").val(url);
			}
		});
	})
</script>